package it.milanoeasy.jdoBeans;

import java.util.Date;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

@PersistenceCapable(table="ApplicationLog")
public class LogBean {	
	//@NotPersistent
    //String someOtherField;
		
    Date date;		
	String ip;		
	String email;
	String message;
	
	@Persistent
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Persistent
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	@Persistent
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}
	
	@Persistent
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String toString(){
		String result="";result+="User: "+getEmail();
		result+=", Date: "+getDate();
		result+=", Msg: "+getMessage();
		return result;
	} 
	
	static public void main(String []args){		
		
	}
    
}
